from google.appengine.ext import db

# Create your models here.
class MyUser(db.Model):
    nickname = db.StringProperty()
    email = db.EmailProperty()#login with the email?
    pwd = db.StringProperty()#hash code of name+password

    #weiboaccount = db.StringProperty()
    #googleaccount =  db.StringProperty()
    #doubanaccount =  db.StringProperty()
    #accounttype = db.IntegerField()#0self,1sina,2google

#how to connect different user account?
class UserClient():
    #need to be a static function
    def getAuthorizedUser(username,password):
        """
        get whether the user is registered and the password is ok
        """
    
    def isUserNameUsed(username):
        """
        if is used return true
        """

    def isEmailUsed(email):
        """
        if is used return true
        """
        
    

#class UserModel(db.Model):
#    """
#    user model with a list of Gauss model and there weight
#    """
#    user = db.ReferenceProperty(Myuser)
#    gausses = db.ListProperty(Gauss3d)#???
#
#class Gauss3d(db.Model):
#    """
#    gauss model of three dimension
#    """
